﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace OnlineEducation.Areas.Teacher.Models
{
    public class RegisterModel
    {
     
        [Display(Name = "手机号")]
        [RegularExpression(@"^1[3456789][0-9]{9}$", ErrorMessage = "{0}格式不正确")]
        public string PhoneNumber { get; set; }

       
        [Display(Name = "邮箱")]
        [RegularExpression(@"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", ErrorMessage = "{0}格式不正确")]
        public string Email { get; set; }

        [Required(ErrorMessage = "登录账号必填")]
        [Display(Name = "登录账号")]
        [RegularExpression(@"(^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$)|(^1[3456789][0-9]{9}$)", ErrorMessage = "{0}格式不正确,请用邮箱或手机号")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(100, ErrorMessage = "{0}至少{2}位.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "密码（默认密码：66666666）")]
        public string Password { get; set; } = "66666666";

        [Display(Name = "姓名")]
        public string FullName { get; set; }


        public int Id { get; set; }


        [Display(Name = "性别")]
        public int? Gender { get; set; }

        [Display(Name = "生日")]
        public DateTime? BirthDate { get; set; }
        [Display(Name = "微信")]
        public string WeChat { get; set; }
        [Display(Name = "微博")]
        public string WeiBo { get; set; }
        [Display(Name = "QQ")]
        public string QQ { get; set; }
        [Display(Name = "头衔")]
        public string Title { get; set; }

        [Display(Name = "签名")]
        public string Signature { get; set; }

        [Display(Name = "头像(150*150)")]
        public string Avatar { get; set; }

        [Display(Name = "介绍")]
        public string Intro { get; set; }

        [Display(Name = "备注")]
        public string Remark { get; set; }
    }
    public class ChangePasswordModel
    {


        [Required(ErrorMessage = "必填")]
        [StringLength(100, ErrorMessage = "{0}至少{2}位.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }


        public int? Id { get; set; }
    }
}
